<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-审核专题">
</@frame.head>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 商品管理 <span class="c-gray en">&gt;</span> 审核专题 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
   <div class="text-c">
    <table class="table">
      <tr>
        <td width="80px;">专题名称：</td>
        <td>${specialTopic.name}</td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;">专题简称：</td>
        <td>${specialTopic.shortName}</td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;">开始时间：</td>
        <td>${(specialTopic.startDate?string("yyyy-MM-dd HH:mm:ss"))!}</td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;">结束时间：</td>
        <td>${(specialTopic.endDate?string("yyyy-MM-dd HH:mm:ss"))!}</td>
        <td></td>
      </tr>
      <tr>
      <tr>
        <td width="80px;">前台地址：</td>
        <td>
        <#if specialTopic.displayType == null || specialTopic.displayType == 1>
            ${clientUrl}/special_topic/template_detail?templateSpecialTopicId=${specialTopic.id}
        <#else>
            ${mobileUrl}/special_topic/template_detail?templateSpecialTopicId=${specialTopic.id}
        </#if>
        </td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;">显示设备：</td>
        <td>
            <#if specialTopic.displayType??>
            ${displayMap['${specialTopic.displayType}']}
            <#else>
            PC端
            </#if>
        </td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;">专题大图：</td>
        <td>
        <img src="${imagePath}/specialTopic/${specialTopic.id}/${specialTopic.mainPicturePath}" width="90" height="90"/>
        </td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;">专题背景：</td>
        <td>${backgroundTypeMap['${specialTopic.backgroundType}']}</td>
        <td></td>
      </tr>
      <tr>
        <td width="80px;"></td>
        <td>
        <#if specialTopic.backgroundType == 1>
        ${specialTopic.background}
        <div style="width:90px;height:90px;background-color:${specialTopic.background}"></div>
        <#else>
        <img src="${imagePath}/specialTopic/${specialTopic.id}/${specialTopic.background}" width="90" height="90"/>     
        </#if>
        </td>
        <td></td>
      </tr>
      <#list specialTopic.itemSet as list>
      <tr> <td >专题分类：</td> <td>${list.name}</td><td></td></tr>
      <tr style="background-color:#EDEDED;"> <td >分类说明：</td> <td>${list.description}</td> <td></td></tr>
      <tr style="background-color:#EDEDED;">
            <td>分类商品：</td>
            <td colspan="2">
               <div  class="text-c">
               <table id="productTable" class="table table-border table-bordered table-bg">
                     <thead> 
                     <tr style="background-color:#EDEDED;">
                        <th >商品编号</th>
                        <th >商品名称</th>
                        <th >商品分类</th>
                        <th >供应商</th>
                        <th >库存</th>
                        <th >商品原价</th>
                        <th >商品价格</th>
                     </tr>
                     </thead>
                     <tbody>
                     <#if list.productSet??>
                       <#list list.productSet as product>
                          <tr style="background-color:#EDEDED;">
                             <td>${product.id}</td>
                             <td>${product.baseInfo.name}</td>
                             <td>
                             <#if product.productProperty??>
                                <#if product.productProperty.prodTypeFour??>
						     	 	${product.productProperty.prodTypeFour.name}
                                <#elseif product.productProperty.prodTypeThree??>
						     	 	${product.productProperty.prodTypeThree.name}
                                <#elseif product.productProperty.prodTypeTwo??>
						     	 	${product.productProperty.prodTypeTwo.name}
                                <#elseif product.productProperty.prodTypeOne??>
						     	 	${product.productProperty.prodTypeOne.name}
                                </#if>
                             </#if>
                             </td>
                             <td>${product.merchant.mercName}</td>
                             <td>${product.storeInfo.storeNum}</td>
                             <td>
                             <#if product.priceInfo.payCostMileage??>
                             ${product.priceInfo.payCostMileage}公里
                             </#if>
                             </td>
                             <td>${product.priceInfo.payOneMileage}公里</td>
                          </tr>
                       </#list>
                     </#if>
                     </tbody>
               </table>
               </div>
           </td>
      </tr>
      </#list>
      <tr>
        <td width="80px;">审核记录：</td>
        <td></td>
        <td ></td>
      </tr>
      </table>
      <table class="table table-border table-bordered table-bg">
         <thead>
            <tr>
               <th>审核结果</th>
               <th>审核说明</th>
               <th>审核人</th>
               <th>审核时间</th>
            </tr>
         </thead>
      <#if specialTopic.logSet?? && specialTopic.logSet?size &gt; 0>
        <#list specialTopic.logSet as auditLog>
            <tr>
                <td>
                  <#if auditLog.result == 2><span class="label label-success radius">审核通过</span>
                  <#elseif auditLog.result == 1><span class="label radius">审核驳回</span>
                  </#if>
                </td>
                <td>${auditLog.remark} </td>
                <td>${auditLog.user.loginName}</td>
                <td>${auditLog.auditDate?string("yyyy-MM-dd HH:mm:ss")}</td>
            </tr>
        </#list>
      <#else>
        <tr><td colspan="4" align="center">暂无审核记录</td></tr>
      </#if>
    </table>
    <br>
      <table>
      <tr>
          <td width="80px"><font style="color:red;">*</font>审核意见：</td> 
          <td width="400px">
            <textarea class="textarea" placeholder="审核意见" id="remark" name="remark" maxlength="90"></textarea>
          </td><td></td>
      </tr>
      <tr>
          <td></td>
          <td><input name="specialTopicId" id="specialTopicId" type="hidden"  value="${specialTopic.id}"/>
			  <input type="button" value="审核通过" class="btn btn-success radius"  onclick="audit(true);"/>
		  &nbsp;&nbsp;&nbsp;
		  <input type="button" value="审核驳回" class="btn btn-warning radius" onclick="audit(false);"/>
		  &nbsp;&nbsp;&nbsp;
		  <button type="button" class="btn btn-secondary radius" onclick="cancle();">关闭页面</button>
		  </td>
          <td></td>
      </tr> 
    </table>
    </div>
    
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/special_topic/template_special_topic_audit.js"></script>
<script type="text/javascript">
var path="${contextPath}";

</script>